<!doctype html> 
<html ng-app='text'> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
    <script type="text/javascript" src='angular.js'></script>
    <script type="text/javascript">


    var app = angular.module('text',[]);
    app.controller('const',function ($scope){
    	$scope.a = 30;
    });

    app.controller('const2',function ($scope){
    	alert($scope.a)
    });


    </script>
</head>
<body ng-controller='const'>
	<div ng-controller='const2'></div>
</body>
</html>